import i18n from "@/i18n";
// import { watch } from "vue";
// import store from "../store";

export function genrateTitle(title: string) {
  return i18n.global.t("msg.route." + title);
}

/**
 * 监听国际化语言切换
 * @param  {...any} cbs
 */
// export function watchSwitchLang(...cbs) {
//   watch(
//     () => store.getters.language,
//     () => {
//       cbs.forEach((cb) => cb(store.getters.language));
//     }
//   );
// }
